<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/jsp/common/head.jsp"%>

<div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>订单管理页面 >> 订单添加页面</span>
        </div>
        <div class="providerAdd">
          <form id="billForm" name="billForm" method="post" action="${pageContext.request.contextPath }/billServlet?method=billMod">
				<input type="hidden" name="billid" value="${billInfo.id}">
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div class="">
                    <label for="billCode">订单编码：</label>
                    <input type="text" name="billCode" id="billCode" value="${billInfo.billCode} " readonly="readonly">
                </div>
                <div>
                    <label for="productName">商品名称：</label>
                    <input type="text" name="productName" id="productName" value="${billInfo.productName}">
					<font color="red"></font>
                </div>
                <div>
                    <label for="productUnit">商品单位：</label>
                    <input type="text" name="productUnit" id="productUnit" value="${billInfo.productName}">
					<font color="red"></font>
                </div>
                <div>
                    <label for="productCount">商品数量：</label>
                    <input type="text" name="productCount" id="productCount" value="${billInfo.productCount}">
					<font color="red"></font>
                </div>
                <div>
                    <label for="totalPrice">总金额：</label>
                    <input type="text" name="totalPrice" id="totalPrice" value="${billInfo.totalPrice}">
					<font color="red"></font>
                </div>
                <div>
                    <label for="providerId">供应商：</label>
                    <select name="providerId">
                        <c:forEach items="${provideList}" var="provide">
                            <option value="${provide.id}" <c:if test="${billInfo.providerId == provide.id }" > selected </c:if>>--${provide.proName}--</option>
                        </c:forEach>
                    </select>
					<font color="red"></font>
                </div>
                <div>
                    <label >是否付款：</label>
                    <select name="isPayment">
                        <option value="1" <c:if test="${billInfo.isPayment == 1 }" > selected </c:if>>未付款</option>
                        <option value="2" <c:if test="${billInfo.isPayment == 2 }" > selected </c:if>>已付款</option>
                    </select>
                </div>
                <div class="providerAddBtn">
                  <input type="button" name="save" id="save" value="保存">
				  <input type="button" id="back" name="back" value="返回" >
              	</div>
            </form>
        </div>

    </div>
</section>

<%@include file="/jsp/common/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.3.min.js" ></script>
<script type="text/javascript">
    $(function() {
        $("#save").click(function () {
            if(confirm("是否确认修改信息？")){
                $("#billForm").submit();
            }
        });

    });
</script>